<?php

declare(strict_types=1);

namespace App\Constants;

use Hyperf\Constants\AbstractConstants;
use Hyperf\Constants\Annotation\Constants;

#[Constants]
class OperaCode extends AbstractConstants
{
    /**
     * @Message('character.add')
     */
    const OPERA_ADD = 1;

    /**
     * @Message('character.sub')
     */
    const OPERA_SUB = 2;

    /**
     * @Message('character.mul')
     */
    const OPERA_MUL = 3;

    /**
     * @Message('character.div')
     */
    const OPERA_DIV = 4;

    /**
     * 符号
     * @var int[]
     */
    public static $operaMap = [
        self::OPERA_ADD => '+',
        self::OPERA_SUB => '-',
        self::OPERA_MUL => '*',
        self::OPERA_DIV => '/'
    ];
}
